﻿using System;
using System.Collections;
using Microsoft.SPOT;

using GadgeteerLibrary;

namespace LibraryConsole
{
    public class Program
    {
        public static void Main()
        {
            //string apiKey = "e7cc056a-fac8-4f58-aa79-f51d9af9b37c";
            //Device device = new Device(1061, "GadgeteerDevice");
            //ArrayList sensors = new ArrayList();
            //Sensor sensor = new Sensor("MyGPS20", SensorType.gps, "GHI", 5000, 20000, 60);
            //sensors.Add(sensor);
            //RESTClient restClient = new RESTClient(apiKey, device, sensors);
            //ArrayList gpsData = new ArrayList();
            //string currentTime = NtpClient.GetNetworkTime().ToString("dd/MM/yyyy HH:mm:ss");
            //gpsData.Add(new TimedData(currentTime, "23.1", "24.1"));

            //Debug.Print(restClient.RegisterSensor().ToString());
            //Debug.Print("ID for " + sensor.Name + ": " + ((Sensor)restClient.Sensors[0]).Id);
            //Debug.Print(restClient.SendCurrentData(gpsData, currentTime, currentTime, "MyGPS20").ToString());
            ////Debug.Print(restClient.DeleteSensor("MyGPS20").ToString());


            string apiKey = "e7cc056a-fac8-4f58-aa79-f51d9af9b37c";
            Device device = new Device(1061, "GadgeteerDevice");
            ArrayList sensors = new ArrayList();
            sensors.Add(new Sensor("MyGPS20", SensorType.gps, "GHI", 5000, 20000, 60));
            RESTClient restClient = new RESTClient(apiKey, device, sensors);

            restClient.RegisterSensor();
        }
    }
}
